<template>
	<view class="base">
		<view class="btn" :style="{borderTop:borderTop?'1rpx solid #f5f5f5':'none'}">
			<slot></slot>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			borderTop:{
				type:Boolean,
				default:true
			}
		}
	}
</script>

<style scoped lang="scss">
	.base {
		height: calc(50px + constant(safe-area-inset-bottom));
		height: calc(50px + env(safe-area-inset-bottom));
		.btn {
			position: fixed;
			bottom: 0;
			left: 0;
			width: 100%;
			height: calc(50px + constant(safe-area-inset-bottom));
			height: calc(50px + env(safe-area-inset-bottom));
			padding-bottom: constant(safe-area-inset-bottom); /* 兼容 iOS < 11.2 */
			padding-bottom: env(safe-area-inset-bottom); /* 兼容 iOS >= 11.2 */
			background: #fff;
			box-sizing: border-box;
			z-index: 999;
		}
	}
</style>